package drds.configuration.web.model.drds_home.table;

import drds.configuration.db.table_mapping.ColumnName;
import drds.configuration.db.table_mapping.Field;
import drds.configuration.db.table_mapping.Table;
import drds.configuration.db.table_mapping.TableInfo;
import drds.configuration.web.build_model.Model;
import drds.configuration.web.model.GroupDataSourceId;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

import java.sql.Timestamp;


@Slf4j
@Table(groupDataSourceId = GroupDataSourceId.DRDS_HOME,//
        tableName = TableDefinition.__TABLE_NAME__, //
        primaryKey = TableDefinition.ID, //
        checkBaseColumn = TableInfo.TRUE)//
public class TableDefinition extends Model {
    public static final String __TABLE_NAME__ = "table_table_definition";
    //公共字段start
    @ColumnName
    public static final String ID = "id";
    @ColumnName
    public static final String ADD_DATE_TIME = "add_date_time";
    @ColumnName
    public static final String ADD_DATE_TIME_LONG = "add_date_time_long";
    @ColumnName
    public static final String ADD_DATE_TIME_TIMESTAMP = "add_date_time_timestamp";
    //*
    @ColumnName
    public static final String UPDATE_DATE_TIME = "update_date_time";
    @ColumnName
    public static final String UPDATE_DATE_TIME_LONG = "update_date_time_long";
    @ColumnName
    public static final String UPDATE_DATE_TIME_TIMESTAMP = "update_date_time_timestamp";
    @ColumnName
    public static final String VERSION = "version";
    @ColumnName
    public static final String TABLE_NAME = "table_name";
    @ColumnName
    public static final String TABLE_TYPE = "table_type";
    @ColumnName
    public static final String PARENT_TABLE_ID = "parent_table_id";
    @ColumnName
    public static final String ROOT_PARENT_TABLE_ID = "root_parent_table_id";
    @ColumnName
    public static final String IS_ACTIVE = "is_active";
    @ColumnName
    public static final String IS_DELETE = "is_delete";
    public static TableDefinition dao = new TableDefinition();
    @Setter
    @Getter
    @Field(withColumnName = ID)
    private Long id;
    @Setter
    @Getter
    @Field(withColumnName = ADD_DATE_TIME)
    private String addDateTime;
    //公共字段end
    @Setter
    @Getter
    @Field(withColumnName = ADD_DATE_TIME_LONG)
    private Long addDateTimeLong;
    @Setter
    @Getter
    @Field(withColumnName = ADD_DATE_TIME_TIMESTAMP)
    private Timestamp addDateTimeTimestamp;


    //    table_type	int	10	0	-1	0	0	0	0	0	0					0	0
//    parent_table_id	bigint	20	0	-1	0	0	0	0	0	0					0	0
//    root_parent_table_id	bigint	20	0	-1	0	0	0	0	0	0					0	0
//
    @Setter
    @Getter
    @Field(withColumnName = UPDATE_DATE_TIME)
    private String updateDateTime;
    @Setter
    @Getter
    @Field(withColumnName = UPDATE_DATE_TIME_LONG)
    private Long updateDateTimeLong;
    @Setter
    @Getter
    @Field(withColumnName = UPDATE_DATE_TIME_TIMESTAMP)
    private Timestamp updateDateTimeTimestamp;
    @Setter
    @Getter
    @Field(withColumnName = VERSION)
    private Long version;
    @Setter
    @Getter
    @Field(withColumnName = TABLE_NAME)
    private String tableName;
    @Setter
    @Getter
    @Field(withColumnName = TABLE_TYPE)
    private Integer tableType;
    @Setter
    @Getter
    @Field(withColumnName = PARENT_TABLE_ID)
    private Long parentTableId;
    @Setter
    @Getter
    @Field(withColumnName = ROOT_PARENT_TABLE_ID)
    private Long rootParentTableId;
    @Setter
    @Getter
    @Field(withColumnName = IS_ACTIVE)
    private Integer isActive;
    @Setter
    @Getter
    @Field(withColumnName = IS_DELETE)
    private Integer isDelete;


}
